<?php
$this->breadcrumbs = array(
    'General Report',
    'Report Summary Member' => array('summary_member'),
);

$this->menu = array();


?>
<div class="flat_area grid_16">
    <h2>Detail Transaction</h2>
</div>
<div class="box grid_16 round_all">
    <h2 class="box_head grad_colour">Data Detail</h2>
    <a href="#" class="grabber">&nbsp;</a>
    <a href="#" class="toggle">&nbsp;</a>
    <div class="toggle_container">
        <div class="block no_padding">
            <?php
            $this->widget('zii.widgets.CDetailView', array(
                'data' => $model,
                'attributes' => array(
                    'transaction_code',
                    array(
                        'label' => 'Buyer',
                        'value' => $model->rel_transaction_to_network->network_mid,
                    ),
                    'transaction_recipient_name',
                    array(
                        'name' => 'transaction_recipient_address',
                        'type' => 'raw',
                        'value' => nl2br($model->transaction_recipient_address),
                    ),
                    'transaction_recipient_phone',
                    array(
                        'name' => 'transaction_total_quantity',
                        'type' => 'raw',
                        'value' => number_format($model->transaction_total_quantity),
                    ),
                    array(
                        'name' => 'transaction_total_price',
                        'type' => 'raw',
                        'value' => 'Rp. '.number_format($model->transaction_total_price),
                    ),
                    array(
                        'name' => 'transaction_datetime',
                        'type' => 'raw',
                        'value' => function_lib::convert_datetime($model->transaction_datetime, 'text', '', ':', 'ina'),
                    ),
                    array(
                        'label' => $model->getAttributeLabel('transaction_is_approve'),
                        'value' => $model->transaction_is_approve == 1 ? 'Approved' : 'Pending',
                    ),
                    array(
                        'label' => 'Transaction Detail',
                        'type' => 'raw',
                        'value' => CHtml::link('Download PDF', array('ecommerce_transaction/print/'.$model->transaction_code), array('target'=>'_blank')),
                    ),
                ),
                'htmlOptions' => array('class' => 'detail'),
            ));
            ?>
        </div>
    </div>
</div>